import React, { Component } from 'react'
import RouterView from '../../router/RouterView'
import { NavLink } from 'react-router-dom'

export default class Home extends Component {
    render() {
        console.log(this.props.routes)
        return (
            <div className="wrap home-page">
                <main>
                    <RouterView routes={this.props.routes} />
                </main>
                <footer>
                    {
                        this.props.routes.map(item => {
                            return item.title ? <NavLink key={item.path} to={item.path}>{item.title}</NavLink> : null
                        })
                    }
                </footer>
            </div>
        )
    }
}
